Skip to main content

Defined in: src/constructs/s3static-site/s3static-site.ts:5

Properties​

autoDeleteObjects?​

readonly optional autoDeleteObjects?: boolean

Defined in: src/constructs/s3static-site/s3static-site.ts:18

When true, empties the bucket on stack deletion. Requires removalPolicy to be RemovalPolicy.DESTROY.

Default​

false

bucketName?​

readonly optional bucketName?: string

Defined in: src/constructs/s3static-site/s3static-site.ts:7

Explicit S3 bucket name. When omitted CloudFormation generates a unique name.


noncurrentVersionExpirationDays?​

readonly optional noncurrentVersionExpirationDays?: number

Defined in: src/constructs/s3static-site/s3static-site.ts:29

When versioning is enabled, expire noncurrent object versions after this many days. Ignored when versioned is false. Must be a positive integer when set.

Default​

30

removalPolicy?​

readonly optional removalPolicy?: RemovalPolicy

Defined in: src/constructs/s3static-site/s3static-site.ts:12

Policy applied when the bucket is removed from the stack.

Default​

RemovalPolicy.RETAIN

serverAccessLogsBucket?​

readonly optional serverAccessLogsBucket?: IBucket

Defined in: src/constructs/s3static-site/s3static-site.ts:41

Optional destination bucket for S3 server access logs.

Requirements (otherwise CloudFormation may succeed while no logs are delivered):

  • Must allow ACLs — use s3.ObjectOwnership.OBJECT_WRITER (or s3.ObjectOwnership.BUCKET_OWNER_PREFERRED). Destinations with s3.ObjectOwnership.BUCKET_OWNER_ENFORCED (CDK/S3 default) cannot receive server access logs.
  • Must be in the same AWS Region as this site bucket.
  • Should be owned by the same account as this site bucket.

serverAccessLogsPrefix?​

readonly optional serverAccessLogsPrefix?: string

Defined in: src/constructs/s3static-site/s3static-site.ts:43

Prefix for server access log objects when serverAccessLogsBucket is set.


versioned?​

readonly optional versioned?: boolean

Defined in: src/constructs/s3static-site/s3static-site.ts:23

Enable S3 object versioning (useful for recovery from a bad deploy).

Default​

false